<form enctype="multipart/form-data" method="post">
<h1 class="page-header">Thêm mới video <small></small></h1>
            <!-- end page-header -->
            
            <!-- begin row -->
            <div class="row">
                <!-- begin col-6 -->
                <div class="col-md-12" >
                    <!-- begin panel -->
                    <div class=" panel panel-inverse" >
                        <div class="panel-heading">
                            <div class="panel-heading-btn">
                                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-default" data-click="panel-expand"><i class="fa fa-expand"></i></a>
                                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-success" data-click="panel-reload"><i class="fa fa-repeat"></i></a>
                                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-warning" data-click="panel-collapse"><i class="fa fa-minus"></i></a>
                                <a href="javascript:;" class="btn btn-xs btn-icon btn-circle btn-danger" data-click="panel-remove"><i class="fa fa-times"></i></a>
                            </div>
                        <h4 class="panel-title">Thông tin video</h4>
                        </div>
                        <div class="panel-body panel-form">
                            <div  class="form-horizontal form-bordered" data-validate="parsley">
                                <div class="form-group">
                                    <input type="hidden" name="video_id" value="<?php echo $this->escapeHtml($data->video_id);?>">
                                    <label class="control-label col-md-3 col-sm-3" for="product_name">Tiêu đề * :</label>
                                    <div class="col-md-7 col-sm-7">
                                        <input class="form-control parsley-validated" type="text" id="fullname" name="title" data-required="true" placeholder="Tiêu đề" value="<?php echo $this->escapeHtml($data->title);?>" required="" validationmessage="Please enter data">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="product_name">Nội dung* :</label>
                                    <div class="col-md-7 col-sm-7">
                                        <input class="form-control parsley-validated" type="text" id="fullname" name="content" data-required="true" value="<?php echo $this->escapeHtml($data->content);?>" placeholder="Nội dung" required="" validationmessage="Please enter data">
                                    </div>
                                </div>


                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="email">Hình ảnh * :</label>
                                    <div class="col-md-7 col-sm-7">
                                       <input type="file" name="image" placeholder="hình ảnh" class="form-control">
                                    </div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="message">Url  * :</label>
                                    <div class="col-md-7 col-sm-7">
                                        <textarea  class="form-control parsley-validated" id="message" name="url" rows="4" data-required="true" data-trigger="change" data-rangelength="[20,1000]" placeholder="Url"required="" validationmessage="Please enter data"><?php echo $this->escapeHtml($data->url);?></textarea>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="email">Chủ đề * :</label>
                                    <div class="col-md-7 col-sm-7">
                                        <select name="categories_id">
                                            <?php foreach ($cate as $value){
                                            echo" <option  value=".$value->categories_id.">".$value->name."</option>";
                                            }?>
                                        </select>
                                    </div>
                                </div>

                                 <div class="form-group">
                                    <label class="control-label col-md-3 col-sm-3" for="email">Trạng thái * :</label>
                                    <div class="col-md-7 col-sm-7">
                                       <select name="status">
                                        <option value="">--Chọn trạng thái--</option>
                                         <option <?php if($data->status==0){echo "selected='selected'";}?> value="0">Hủy </option>
                                         <option <?php if($data->status==1){echo "selected='selected'";}?> value="1">Xác nhận</option>
                                       </select>
                                    </div>
                                </div>


                                <div class="form-group">
                                    <div class="col-md-5 col-sm-5">
                                    </div>
                                    <div class="col-md-7 col-sm-7">
                                       
                                       <input type="submit" class="btn btn-primary" name="submit" value="Sua video">  
                                    </div>
                                </div>
                                
                                
                                
                            </div>
                        </div>
                    </div>
                    <!-- end panel -->
                    <!--Chi tiet -->
            
               
                </div>
                <!-- end col-6 -->
            </div>
            <!-- end row -->
</form>

<?php 
$message =$this->layout()->message;

if(isset($message)){?>
<script type="text/javascript">
    $(document).ready(function(){
        alert('<?php echo $message;?>');
    });
</script>
<?php }?>